//
//  UIImage+XYImage.m
//  新项目
//
//  Created by xmy on 2017/2/22.
//  Copyright © 2017年 xmy. All rights reserved.
//

#import "UIImage+XYImage.h"

@implementation UIImage (XYImage)
+ (instancetype)getScreenSnap{
    UIWindow *windown = UIApplication.sharedApplication.keyWindow;
    
    UIGraphicsBeginImageContextWithOptions(windown.bounds.size, false, 0);

    CGContextRef ctx = UIGraphicsGetCurrentContext();
    
    CGContextStrokePath(ctx);

    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
    
    //返回
    return image;
}

@end
